<Project Sdk="Microsoft.NET.Sdk">
  <Import Condition="'$(TargetOS)' == 'browser'" Project="$(CommonTestPath)System/Net/Prerequisites/LocalEchoServer.props" />

  <PropertyGroup>
    <StringResourcesPath>../src/Resources/Strings.resx</StringResourcesPath>
    <TargetFrameworks>$(NetCoreAppCurrent);$(NetCoreAppCurrent)-browser</TargetFrameworks>
    <DefineConstants>$(DefineConstants);NETSTANDARD</DefineConstants>
  </PropertyGroup>

  <PropertyGroup Condition="'$(TargetOS)' == 'browser'">
    <!-- This doesn't run on V8 because it lacks websocket support -->
    <Scenario>WasmTestOnBrowser</Scenario>
    <TestArchiveTestsRoot>$(TestArchiveRoot)browserornodejs/</TestArchiveTestsRoot>
    <TestArchiveTestsDir>$(TestArchiveTestsRoot)$(OSPlatformConfig)/</TestArchiveTestsDir>
    <DefineConstants>$(DefineConstants);TARGET_BROWSER</DefineConstants>
    <XunitShowProgress>true</XunitShowProgress>

    <!-- This WASM test is problematic and slow right now. This sets the xharness timeout but there is also override in sendtohelix-browser.targets -->
    <WasmXHarnessTestsTimeout>01:15:00</WasmXHarnessTestsTimeout>
  </PropertyGroup>

  <ItemGroup>
    <WasmExtraFilesToDeploy Include="package.json" />
    <WasmExtraFilesToDeploy Include="package-lock.json" />

    <NodeNpmModule Include="ws" Alias="WebSocket" />
  </ItemGroup>

  <!-- Do not reference these assemblies from the TargetingPack since we are building part of the source code for tests. -->
  <ItemGroup>
    <DefaultReferenceExclusion Include="System.Configuration" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="$(CommonTestPath)System\Net\Capability.Security.cs" Link="Common\System\Net\Capability.Security.cs" />
    <Compile Include="$(CommonTestPath)System\Net\Configuration.cs" Link="Common\System\Net\Configuration.cs" />
    <Compile Include="$(CommonTestPath)System\Net\Configuration.Certificates.cs" Link="Common\System\Net\Configuration.Certificates.cs" />
    <Compile Include="$(CommonTestPath)System\Net\Configuration.Http.cs" Link="Common\System\Net\Configuration.Http.cs" />
    <Compile Include="$(CommonTestPath)System\Net\Configuration.Security.cs" Link="Common\System\Net\Configuration.Security.cs" />
    <Compile Include="$(CommonTestPath)System\Net\Configuration.WebSockets.cs" Link="Common\System\Net\Configuration.WebSockets.cs" />
    <Compile Include="$(CommonTestPath)System\Net\EventSourceTestLogging.cs" Link="Common\System\Net\EventSourceTestLogging.cs" />
    <Compile Include="$(CommonTestPath)System\Net\Http\LoopbackProxyServer.cs" Link="Common\System\Net\Http\LoopbackProxyServer.cs" />
    <Compile Include="$(CommonTestPath)System\Net\Http\LoopbackServer.cs" Link="Common\System\Net\Http\LoopbackServer.cs" />
    <Compile Include="$(CommonTestPath)System\Net\Http\Http2LoopbackServer.cs" Link="Common\System\Net\Http\Http2LoopbackServer.cs" />
    <Compile Include="$(CommonTestPath)System\Net\Http\Http2LoopbackConnection.cs" Link="Common\System\Net\Http\Http2LoopbackConnection.cs" />
    <Compile Include="$(CommonTestPath)System\Net\Http\Http2Frames.cs" Link="Common\System\Net\Http\Http2Frames.cs" />
    <Compile Include="$(CommonTestPath)System\Net\Http\TestHelper.cs" Link="Common\System\Net\Http\TestHelper.cs" />
    <Compile Include="$(CommonTestPath)System\Net\Http\QPackTestDecoder.cs" Link="Common\System\Net\Http\QPackTestDecoder.cs" />
    <Compile Include="$(CommonTestPath)System\Net\Http\HuffmanDecoder.cs" Link="Common\System\Net\Http\HuffmanDecoder.cs" />
    <Compile Include="$(CommonTestPath)System\Net\Http\HuffmanEncoder.cs" Link="Common\System\Net\Http\HuffmanEncoder.cs" />
    <Compile Include="$(CommonTestPath)System\Net\Http\HPackEncoder.cs" Link="Common\System\Net\Http\HPackEncoder.cs" />
    <Compile Include="$(CommonTestPath)System\Net\Http\GenericLoopbackServer.cs" Link="Common\System\Net\Http\GenericLoopbackServer.cs" />
    <Compile Include="$(CommonTestPath)System\Security\Cryptography\PlatformSupport.cs" Link="CommonTest\System\Security\Cryptography\PlatformSupport.cs" />
    <Compile Include="$(CommonTestPath)System\Threading\Tasks\TaskTimeoutExtensions.cs" Link="Common\System\Threading\Tasks\TaskTimeoutExtensions.cs" />
    <Compile Include="AbortTest.cs" />
    <Compile Include="AbortTest.Loopback.cs" />
    <Compile Include="CancelTest.cs" />
    <Compile Include="ClientWebSocketOptionsTests.cs" />
    <Compile Include="ClientWebSocketTestBase.cs" />
    <Compile Include="ClientWebSocketUnitTest.cs" />
    <Compile Include="CloseTest.cs" />
    <Compile Include="ConnectTest.Http2.cs" />
    <Compile Include="ConnectTest.cs" />
    <Compile Include="KeepAliveTest.cs" />
    <Compile Include="LoopbackHelper.cs" />
    <Compile Include="LoopbackServer\Http2LoopbackStream.cs" />
    <Compile Include="LoopbackServer\LoopbackWebSocketServer.cs" />
    <Compile Include="LoopbackServer\WebSocketHandshakeHelper.cs" />
    <Compile Include="LoopbackServer\WebSocketRequestData.cs" />
    <Compile Include="ResourceHelper.cs" />
    <Compile Include="SendReceiveTest.cs" />
    <Compile Include="SendReceiveTest.Http2.cs" />
    <Compile Include="WebSocketData.cs" />
    <Compile Include="WebSocketHelper.cs" />
    <Compile Include="DeflateTests.cs" />
  </ItemGroup>
  <ItemGroup>
    <PackageReference Include="System.Net.TestData" Version="$(SystemNetTestDataVersion)" />
  </ItemGroup>
</Project>
